package com.cloud.prac.aop.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

/**
 * 防重复提交注解
 *
 * @author 24373
 * @version 1.0
 * @date 2024-08-04 11:38
 */
@Inherited
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface RepeatSubmit {

    /**
     * 间隔时长
     */
    int interval() default 3000;

    TimeUnit timeUnit() default TimeUnit.MICROSECONDS;

    /**
     * 报错提示消息
     */
    String message() default "请勿重复提交，稍后再试";

}
